#!/bin/bash
#---------------------------------------------------
#运行GCBS工具之前，通过运行本脚本实现以下功能
#    1.安装GCBS运行环境
#---------------------------------------------------

MYDIR=$(cd "$(dirname "$0")";pwd)

RUNDIR=$(cd ${MYDIR}/../../..;pwd)

#获取桌面端还是服务端
TYPE=$1

# 1.配置环境和root用户免密登陆
yum --version > /dev/null 2>&1
if (( $? == 0 ));then
	sudo ./prepare-rpm.sh $TYPE
else
	sudo ./prepare-deb.sh $TYPE
fi

echo "==============================依赖包安装信息==============================="
cat install_packages.log
echo "==========================================================================="

reval=`grep "ERROR:" install_packages.log`
if [ `echo $?` -eq 0 ]; then
	echo "安装错误如下："
	grep "ERROR:" install_packages.log
fi


